import {createRouter, createWebHistory} from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import( '../views/Home')
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/admin/account',
        name: 'AdminUser',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/AdminUser')
    },
    {
        path: '/admin/ebook',
        name: 'AdminEbook',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/AdminEbook')
    },
    {
        path: '/admin/category',
        name: 'AdminCategory',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/AdminCategory')
    },
    {
        path: '/admin/doc',
        name: 'AdminDoc',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/AdminDoc')
    }



]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
